//
//  CTCommentTable.h
//  cactus
//
//  Created by wd on 11-12-1.
//  Copyright 2011年 ifeng. All rights reserved.
//
@protocol callBack <NSObject>
-(void)notResign;
-(void)ctCountCount:(int)count;
@end
#import <UIKit/UIKit.h>
@class CKBody;
#import "EGORefreshTableBottomView.h"


@class CTCommentViewController;

typedef enum _commentCellType
{
  commonCommentType = 0,
  commentReplayType
}commnetCellType;

@interface CTCommentTable : UIView <EGORefreshTableBottomDelegate,
UITableViewDelegate,UITableViewDataSource>
{
    NSArray *hottestComments;
    NSMutableArray *myComments;
    NSDictionary *content;
    CKBody *body;
    EGORefreshTableBottomView *_refreshBottomView;
    BOOL _isGettingMore;
    NSString *wwwUrl;
    NSString *uuid;
    NSString *objectId;

    NSString *replayCommentId;
    NSString *documentId;
    NSMutableArray *showHiddenFloorIndexPaths;   //数组中存储了当评论较多时，显示隐藏楼层的indexpath
    
    BOOL isReceviedSuccessed;
    BOOL bLoadingMore;
}
@property (nonatomic, strong) NSArray *hottestComments;
@property (nonatomic, strong) NSMutableArray *myComments;
@property (nonatomic, strong) NSString *wwwUrl,*uuid;
@property (nonatomic, strong) NSDictionary *content;
@property (nonatomic, strong) CKBody *body;
@property (nonatomic, weak) id<callBack>ctDelegate;
@property (nonatomic, strong) NSString *replayCommentId;
@property (nonatomic, strong) NSMutableArray *showHiddenFloorIndexPaths;
@property (nonatomic,strong) NSDictionary *commentsDic;
@property (nonatomic,strong) NSString *documentId;
@property (nonatomic,strong) UITableView *table;

-(void)initWithData;
//淡入淡出按钮

- (void)setCommentData:(NSDictionary *)dataDic;

- (void)setCommentFail;

- (void)addReplayAtIndexPath:(NSIndexPath *)indexPath
          withLocateInWindow:(CGPoint)locateInWindow
            withLocateInCell:(CGPoint)locateInCell
              withSizeOfCell:(CGSize)sizeOfCell
               withSourceDic:(NSDictionary *)dic
         atParentsArrayIndex:(NSInteger)parentsArrayIndex
                   withLevel:(NSNumber *)level
                    withView:(UIView *)view;

- (BOOL)hasCommentData;
//-(void)initMyComments:(BOOL)isReloadTable;
-(void)tableReloadData;
- (void)supportClickedWihtIndexPath:(NSDictionary *)dic;
@end
